# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-netaddr-ip
_pkgreal=NetAddr-IP
pkgver=4.079
pkgrel=13
pkgdesc="Perl extension for managing IPv4 and IPv6 addresses and subnets"
url="https://metacpan.org/dist/NetAddr-IP"
arch="all"
license="Artistic-1.0-Perl OR GPL-1.0-or-later"
depends="perl"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/M/MI/MIKER/NetAddr-IP-$pkgver.tar.gz"

builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	# creates file collision among perl modules
	find "$pkgdir" -name perllocal.pod -delete
}

sha512sums="
8ebc8ffb914cf72c041441f96de0e9c982eebdb8c26dbf15f885d0113b3634e4851d81f13f555c14d1fdf0ab95ae2ce880ed124e6c200e391adae3b1d6d3eb65  NetAddr-IP-4.079.tar.gz
"
